early-needle-23221
07/18/2024, 5:22 PMprefix${v}suffix
)
2: pulumi.interpolate prefix${v}suffix
See https://www.pulumi.com/docs/concepts/inputs-outputs for more details.
This function may throw in a future version of @pulumi/pulumi.):
error: gcpcompute/networkPeeringNetworkPeering resource 'sbxprod2Calling [toString] on an [OutputT] is not supported.
To get the value of an OutputT as an Outputstring consider either:
1: o.apply(v => prefix${v}suffix
)
2: pulumi.interpolate prefix${v}suffix
See https://www.pulumi.com/docs/concepts/inputs-outputs for more details.
This function may throw in a future version of @pulumi/pulumi.' has a problem: "name" ("sbxprod2Calling [toString] on an [OutputT] is not supported.\n\nTo get the value of an OutputT as an Outputstring consider either\n1 o.apply(v => prefix${v}suffix
)\n2: pulumi.interpolate `prefix${v}suffix`\n\nSee https://www.pulumi.com/docs/concepts/inputs-outputs for more details.\nThis function may throw in a future version of @pulumi/pulumi.") doesn't match regexp "^(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)$". Examine values at 'sbxprod2Calling [toString] on an [OutputT] is not supported.little-cartoon-10569
07/18/2024, 7:56 PMCalling [toString] on an [Output<T>] is not supported.The problem is that you're doing a "now" calculation using a future value. "networkSelfLink" isn't available yet, only the Output wrapper around it is.
little-cartoon-10569
07/18/2024, 7:57 PMapply()
. Are you passing this value to an arg parameter of a resource constructor? You can pass outputs in there and Pulumi will unwrap them in the future, when the values are available.little-cartoon-10569
07/18/2024, 7:57 PMlittle-cartoon-10569
07/18/2024, 8:00 PMconst peeringResource = new PeeringResource("peeringAtoB", {
name: hubEnv.apply((hub) => shrdConfig.get("env") + "2" + hub).
anotherArg: ...
...
});
little-cartoon-10569
07/18/2024, 8:02 PMpulumi.all()
.
https://www.pulumi.com/docs/concepts/inputs-outputs/all/little-cartoon-10569
07/18/2024, 8:03 PMpulumi.interpolate
, that is sugar around pulumi.all()
. It's described on the same page.early-needle-23221
07/18/2024, 9:30 PMearly-needle-23221
07/18/2024, 9:38 PM